package com.uvnos4j.matilda.system.vo;

import com.uvnos4j.matilda.commons.vo.AbstractVo;
import com.uvnos4j.matilda.system.domain.SysUser;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 用户 Vo
 * <p>
 * Description:用户 Vo
 * </p>
 *
 * @author Guo.wl
 * @version v1.0.0
 * @see com.uvnos4j.matilda.system.vo
 * @since 2020-08-31 23:32:15
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class UserVo extends AbstractVo<SysUser> {

    @NotBlank(message = "用户名不可以为空")
    @Length(min = 1, max = 20, message = "用户名长度需要在20个字以内")
    private String username;

    private String icon;

    @NotBlank(message = "邮箱不允许为空")
    @Length(min = 5, max = 50, message = "邮箱长度需要在50个字符以内")
    private String email;

    @NotBlank(message = "部门不允许为空")
    private String deptId;

    @NotBlank(message = "昵称不允许为空")
    private String nickName;

    @Length(max = 200, message = "备注长度需要在200个字以内")
    private String note;

    @NotNull(message = "用户的状态不能为空")
    @Min(value = 0, message = "用户状态不合法")
    @Max(value = 2, message = "用户状态不合法")
    private Integer status;

}